package com.sky.loveshop.mapper;

import com.sky.loveshop.entity.Shelf;
import com.sky.loveshop.entity.vo.AreaShelfVO;
import com.sky.loveshop.entity.vo.ShelfVO;
import com.sky.loveshop.utils.MyMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ShelfMapper extends MyMapper<Shelf> {

    List<ShelfVO> searchAll(Shelf shelf);

    Shelf getShelfById(@Param("id") Integer id);

    Integer delShelfById(@Param("id") Integer id);

    Integer updateShelfById(Shelf shelf);

    Integer insertOne(Shelf shelf);

    List<Shelf> getShelfListByIds(@Param("ids") List<Integer> ids);

    List<String> getShelfListByShopId(@Param("shopId") Integer shopId);

    List<Shelf> getShelfByShopIdAndArea(@Param("shopId") Integer shopId, @Param("area") String area, @Param("keyWords") String keyWords);

    List<AreaShelfVO> getAreaTotalNo(@Param("shopId") Integer shopId);

    List<AreaShelfVO> getAreaLevelGroup(@Param("shopId") Integer shopId);

    Shelf getShelfByNameAndShopId(@Param("keyWords") String keyWords, @Param("shopId") Integer shopId);
}